Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

DBTableDataSources
(informal protocol)

Category Of:	Object

Declared In:	dbkit/tableProtocols.h

Category Description

The DBTableDataSource protocol provides methods used by the DBTableView and its formatters to determine what should be displayed to the user.  The object designated as the DBTableView's data source must be prepared to report how many rows of data are available, to supply values for a given row and column, and to accept modified values for a given row and column.

Method Types

Reporting table size	- rowCount
- columnCount

Getting/setting data	- getValueFor:at:into:
- getValueFor::into:
- setValueFor:at:from:
- setValueFor::from:

Instance Methods

columnCount

- (unsigned int)columnCount

Returns the number of columns in the data table from which values are being displayed.

getValueFor::into:

- getValueFor:rowIdentifier 
:columnIdentifier 
into:aValue

Copies the value of an attribute from the data source (for example, a DBRecordList) into the object aValue.  The arguments rowIdentifier and columnIdentifier are properties (so this method of extracting a value does not depend on position either in the data source or in the display).   Returns self.

See also:  - getValueFor:at:into:

getValueFor:at:into:

- getValueFor:identifier
at:(unsigned int)aPosition
into:aValue

Copies the value of an attribute from a position in the data source (for example, a DBRecordList) into the object aValue.  The argument identifier describes the desired attributed in terms used by the source, rather than those used by the display, which may differ.  (See the discussion of identifier in the DBTableVectors protocol.)  The argument aPosition is an index in the source table.  Returns self.

See also:  - getValueFor::into:

rowCount

- (unsigned int)rowCount

Returns the number of rows in the data table from which values are being displayed.

setValueFor::from:

- setValueFor:rowIdentifier 
:columnIdentifier 
from:aValue

Sets an attribute in the data source (for example, a DBRecordList) so that its value becomes aValue.  The arguments rowIdentifier and columnIdentifier are properties (so this method of setting a value does not depend on position either in the data source or in the display).   Returns self.

See also:  - setValueFor:at:from:

setValueFor:at:from:

- setValueFor:identifier 
at:(unsigned int)aPosition 
from:aValue

Sets an attribute at a position in the data source (for example, a DBRecordList) so that its value becomes aValue.  The argument identifier describes the target attributed in terms used by the source, rather than those used by the display, which may differ.  (See the discussion of identifier in the DBTableVectors protocol.)  Copies the value of the object aValue into aPosition, an index in the source table.  Returns self.

See also:  - setValueFor::from: